<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
   <input type="text" id="email" placeholder="请输入邮箱">

<script>
  const emailInput = document.querySelector("email");

  emailInput.addEventListener("focus", function () {
    console.log("输入框获得焦点了！可以开始输入邮箱");
    this.style.borderColor = "blue"; // 变个颜色提示
  });
</script>



    
</body>

</html>